<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
	if(isset($_GET["do"]) && $_GET["do"] == 'com'){
		echo '
		<script language="javascript">
			window.onload=function(){
			document.getElementById("com_writer").focus();
			}
		</script>';
	}
?>

<link href="<?=$this->styleurl?>/css/retu.css" rel="stylesheet" type="text/css" />
<div class="news_comments">
	<div class="comments_ct">
	  <div class="middle">
	        <p class="comment_note">
			网友评论
	        </p>
			<?php
			$j = 1;
			$p = isset($_GET["p"]) ? $_GET["p"] : 1;
			$p < 0 && $p ==1;
			foreach ($this->paginator as $row):
			?>
            <div class="comment">
                <div class="midd">
                    <p class="title">
                        <span class="user"><span class="name"><?php echo $row["com_writer"];?></span>
                        <span class="text">在(<?php echo date('Y-m-d H:i:s',$row["com_date"]);?>)发表 </span></span><span class="level"><?php echo 5*($p-1)+$j;$j++;?></span></p>
                    <p class="note">
                       <?php echo $row["com_content"];?>
                    </p>

                </div>
                <div class="bottom">
                </div>
             </div>
		<?php 
		endforeach;
		?>
</div>
<div class="page1">
 共<?php echo $this->total_comment;?>个评论
 <?=$this->paginationControl($this->paginator, 'Elastic', 'pagestyle.phtml'); ?>
</div>
 <div class="replay" style=" height:204px;">
	<table border="0" cellpadding="0" style="border-style:solid; border-width:1px; padding:1px; border-collapse: collapse" bordercolor="#CCCCCC" width="100%" height="184">
<tr><td>&nbsp;</td></tr>
<form name="form1" action="<?=$this->baseUrl?>/article/addcomment" method="POST" style="margin:0px; padding:0px;">
<tr>
<td width="96" height="20">
  <div align="right" style="font-size:12px">用户名：</div></td>
<td height="20"><input type="text" id="com_writer" name="com_writer" size="16" maxlength="50" value="" />
&nbsp;&nbsp;
  <input disabled readonly="readonly"   type="text"   name="remLen"   size="4"   maxlength="3"   value="100" />个字符</td>
</tr>
<tr>
<td width="96" height="40">
  <div align="right" style="font-size:12px">验证码：</div></td>
<td height="30">
<input type="text" name="verify" size="12" style="height:25px" value="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img onclick="change_verify()" id="verify_img" src="/verify?r=<?php echo rand(0,10000);?>" height="30" width="90" style="vertical-align: middle;">
</td>
</tr>
<tr>
<td width="96" height="71">
 <script   language="javascript">   
  <!--//   
  function   textCounter(field,   countfield,   maxlimit)   {   
  //   定义函数，传入3个参数，分别为表单区的名字，表单域元素名，字符限制；   
  if   (field.value.length   >   maxlimit)     
  //如果元素区字符数大于最大字符数，按照最大字符数截断；     
  field.value   =   field.value.substring(0,   maxlimit);   
  else   
  //在记数区文本框内显示剩余的字符数；     
  countfield.value   =   maxlimit   -   field.value.length;   
  }
  function change_verify(){
  	var img = document.getElementById("verify_img");
	img.src = "/verify?r="+ Math.random();
  }
  //-->   
  </script>   
    
<div align="right" style="font-size:12px">回复内容：</div></td>
<td width="396" height="71">
<textarea rows="4" name="com_content" cols="50" onKeyDown="textCounter(this.form.com_content,this.form.remLen,100);" onKeyUp="textCounter(this.form.com_content,this.form.remLen,100);">
</textarea>
  <input name="id" type="hidden" id="id" value="<?php echo $_GET["id"];?>" /></td>
</tr>
<tr>
<td height="30" colspan="2">
  <div align="center">
    <input type="submit" value="发布" name="hf">
    <input name="action" type="hidden" id="action" value="add">
  </div></td>
</tr>
<tr>
<td colspan="2">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">

<tr><td width="100%" height="1" colspan="4"></td></tr>
</table>
</td>
</tr>
</form>
</table>
		  </div>
        </div>

    </div>
</div>
